package project.dade.cn.bst.adapter.base;

import java.io.Serializable;
import java.util.ArrayList;

import project.dade.cn.bst.model.ShopModel;

public class ShoppingCartBean implements Serializable {

	// /*
	private ArrayList<ShopModel> ProductList = new ArrayList<ShopModel>(); // 存储购物车内所有内容

	public float caluTotalMoney() {

		double t = 0;
		for (ShopModel i : getProductList()) {

			int num = Integer.valueOf(i.getQuantity());
			double sell = Double.valueOf(i.getPrice());

			if (true /* i.bSelected */) // 商品是被选择的
				t += sell * num;
		}

		// double result = Utils1.round(t, 2);

		return (float) t;

	}

	public ArrayList<ShopModel> getProductList() {
		return ProductList;
	}

	public void setProductList(ArrayList<ShopModel> productList) {
		ProductList = productList;
	}

	// */

}
